--- @param extension Package
--- @param HY HY_Utility
--- @param U Utility
return function(extension, HY, U)
    local hy_komeiji_satori = General:new(extension, "hy_komeiji_satori", "ten_k", 4, 4, General.Female)
    local remember = fk.CreateSkill {
        name = "remember",
    }
    remember:addEffect("active", {
        anim_type = "offensive",
        target_num = 1,
        card_num = 0,
        can_use = function(self, player)
            return player:usedSkillTimes(remember.name, Player.HistoryPhase) == 0
        end,
        card_filter = Util.FalseFunc,
        target_filter = function(self, to_select, selected)
            return #selected == 0 and to_select ~= Self.id and not to_select:isKongcheng()
        end,
        prompt = function(self, selected_cards, selected_targets)
            return "remember_prompt"
        end,
        on_use = function(self, room, effect)
            local player = effect.from
            local target = effect.tos[1]
            local targetCards = table.clone(target.player_cards[Player.Hand])
            target:showCards(targetCards)
            room:fillAG(player, targetCards)
            local result = room:askToDiscard(player, {
                min_num = 1,
                max_num = 1,
                skill_name = remember.name
            })
            room:closeAG()
            if #result > 0 then
                local selectedId = result[1]
                local selectedCard = Fk:getCardById(selectedId, true)
                if table.find(targetCards, function(id, _, _)
                        return Fk:getCardById(id).type == selectedCard.type
                    end) ~= nil and not player.dead then
                    player:drawCards(1, remember.name)
                end
                if table.find(targetCards, function(id, _, _)
                        return Fk:getCardById(id).suit == selectedCard.suit
                    end) ~= nil then
                    local getId = room:askToChooseCard(player, {
                        target = target,
                        flag = "h",
                        skill_name = remember.name
                    })
                    room:obtainCard(player, getId, false)
                end
                if table.find(targetCards, function(id, _, _)
                        return Fk:getCardById(id).number == selectedCard.number
                    end) ~= nil then
                    local skillTarget = room:askToChoosePlayers(player, {
                        targets = table.filter(room.alive_players, function(t)
                            return t == target or target:inMyAttackRange(t)
                        end),
                        min_num = 1,
                        max_num = 1,
                        prompt = "remember_prompt_damage",
                        skill_name = remember.name,
                        cancelable = false,
                    })
                    room:damage({
                        to = skillTarget[1],
                        damage = 1,
                        damageType = fk.NormalDamage,
                        skillName = remember.name,
                    })
                end
            end
        end,
    })
    extension:loadSkillSkels { remember }
    hy_komeiji_satori:addSkill("remember")
    Fk:loadTranslationTable {
        ["hy_komeiji_satori"] = "古明地觉",
        ["#hy_komeiji_satori"] = "生惧倒影",
        ["illustrator:hy_komeiji_satori"] = "Cheese-Roll",
        ["designer:hy_komeiji_satori"] = "黑曜人形",
        ["cv:hy_komeiji_satori"] = "",

        ["remember"] = "回忆",
        [":remember"] = "出牌阶段限一次，你可以令一名有手牌的其他角色展示所有手牌，然后你可以弃置一张手牌，若你弃置的牌与展示牌存在相同的：<br>&nbsp;&nbsp;&nbsp;&nbsp;类型，摸一张牌；<br>&nbsp;&nbsp;&nbsp;&nbsp;花色，你获得其一张手牌；<br>&nbsp;&nbsp;&nbsp;&nbsp;点数，令其或其攻击范围内一名角色受到1点伤害。",
        ["remember_prompt"] = "回忆：你可以展示一名角色的手牌",
        ["remember_prompt_damage"] = "回忆：你可以令一名角色受到1点伤害",
    }
end
